<!DOCTYPE html>
<html lang="zh-Hans">
<head>

    <!--[if lt IE 9]>
        <style>body {display: none; background: none !important} </style>
        <meta http-equiv="Refresh" Content="0; url=//outdatedbrowser.com/" />
    <![endif]-->

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="format-detection" content="telephone=no" />
<meta name="author" content="BrightSoul" />



<meta name="description" content="AirSim是微软在2017年发布的无人机无人车仿真框架，基于虚幻引擎开发。最初的开发目的用于生成机器学习的数据，不过随着这几年功能不断完善，作为机器视觉实验平台和任务仿真的工具也是一个不错的选择。特别是和Pixhawk通过MAVlink链接后可以进行SITL和HITL，可以简单的从仿真环境移植到真实的无人机。 本文将分享一些AirSim的使用体验，然后简单介绍AirSim仿真环境的搭建，最后介绍">
<meta property="og:type" content="article">
<meta property="og:title" content="Airsim仿真">
<meta property="og:url" content="https://brightsoulxyhy.github.io/articles/2020-06Airsim%E4%BB%BF%E7%9C%9F/index.html">
<meta property="og:site_name" content="我不想写博客之博客">
<meta property="og:description" content="AirSim是微软在2017年发布的无人机无人车仿真框架，基于虚幻引擎开发。最初的开发目的用于生成机器学习的数据，不过随着这几年功能不断完善，作为机器视觉实验平台和任务仿真的工具也是一个不错的选择。特别是和Pixhawk通过MAVlink链接后可以进行SITL和HITL，可以简单的从仿真环境移植到真实的无人机。 本文将分享一些AirSim的使用体验，然后简单介绍AirSim仿真环境的搭建，最后介绍">
<meta property="og:locale">
<meta property="og:image" content="https://hexo-blog-bs.oss-cn-beijing.aliyuncs.com/_blog-img/2020-06Airsim%E4%BB%BF%E7%9C%9F/image-20200515230754300.png">
<meta property="og:image" content="https://hexo-blog-bs.oss-cn-beijing.aliyuncs.com/_blog-img/2020-06Airsim%E4%BB%BF%E7%9C%9F/image-20200602155121660.png">
<meta property="og:image" content="https://hexo-blog-bs.oss-cn-beijing.aliyuncs.com/_blog-img/2020-06Airsim%E4%BB%BF%E7%9C%9F/image-20200602155400378.png">
<meta property="og:image" content="https://hexo-blog-bs.oss-cn-beijing.aliyuncs.com/_blog-img/2020-06Airsim%E4%BB%BF%E7%9C%9F/image-20200602154320711.png">
<meta property="og:image" content="https://hexo-blog-bs.oss-cn-beijing.aliyuncs.com/_blog-img/2020-06Airsim%E4%BB%BF%E7%9C%9F/image-20200515232924152.png">
<meta property="og:image" content="https://hexo-blog-bs.oss-cn-beijing.aliyuncs.com/_blog-img/2020-06Airsim%E4%BB%BF%E7%9C%9F/image-20200602163313679.png">
<meta property="og:image" content="https://hexo-blog-bs.oss-cn-beijing.aliyuncs.com/_blog-img/2020-06Airsim%E4%BB%BF%E7%9C%9F/image-20200602161432813.png">
<meta property="article:published_time" content="2020-06-01T16:00:00.000Z">
<meta property="article:modified_time" content="2021-02-03T09:53:30.257Z">
<meta property="article:author" content="BrightSoul">
<meta property="article:tag" content="SITL">
<meta property="article:tag" content="AirSim">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://hexo-blog-bs.oss-cn-beijing.aliyuncs.com/_blog-img/2020-06Airsim%E4%BB%BF%E7%9C%9F/image-20200515230754300.png">

<link rel="apple-touch-icon" href= "/apple-touch-icon.png">


    <link rel="alternate" href="/atom.xml" title="我不想写博客之博客" type="application/atom+xml">



    <link rel="shortcut icon" href="/img/robot.png">



    <link href="//cdn.bootcss.com/animate.css/3.5.1/animate.min.css" rel="stylesheet">



    <link href="//cdn.bootcss.com/fancybox/2.1.5/jquery.fancybox.min.css" rel="stylesheet">



    <script src="//cdn.bootcss.com/pace/1.0.2/pace.min.js"></script>
    <link href="//cdn.bootcss.com/pace/1.0.2/themes/blue/pace-theme-minimal.css" rel="stylesheet">



<link rel="stylesheet" href="/css/style.css">




<link href="//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">


<title>Airsim仿真 | 我不想写博客之博客</title>

<script src="//cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
<script src="//cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js"></script>

<script>
    var yiliaConfig = {
        fancybox: true,
        animate: true,
        isHome: false,
        isPost: true,
        isArchive: false,
        isTag: false,
        isCategory: false,
        fancybox_js: "//cdn.bootcss.com/fancybox/2.1.5/jquery.fancybox.min.js",
        scrollreveal: "//cdn.bootcss.com/scrollReveal.js/3.1.4/scrollreveal.min.js",
        search: true
    }
</script>


    <script> yiliaConfig.jquery_ui = [false]; </script>



    <script> yiliaConfig.rootUrl = "\/";</script>






<meta name="generator" content="Hexo 5.3.0"></head>
<body>
  <div id="container">
    <div class="left-col">
    <div class="overlay"></div>
<div class="intrude-less">
    <header id="header" class="inner">
        <a href="/" class="profilepic">
            <img src="/img/BrightSoul.jpg" class="animated zoomIn">
        </a>
        <hgroup>
          <h1 class="header-author"><a href="/">BrightSoul</a></h1>
        </hgroup>

        
        <p class="header-subtitle">顺不妄喜，逆不惶馁。</p>
        

        
            <form id="search-form">
            <input type="text" id="local-search-input" name="q" placeholder="search..." class="search form-control" autocomplete="off" autocorrect="off" searchonload="true" />
            <i class="fa fa-times" onclick="resetSearch()"></i>
            </form>
            <div id="local-search-result"></div>
            <p class='no-result'>No results found <i class='fa fa-spinner fa-pulse'></i></p>
        


        
            <div id="switch-btn" class="switch-btn">
                <div class="icon">
                    <div class="icon-ctn">
                        <div class="icon-wrap icon-house" data-idx="0">
                            <div class="birdhouse"></div>
                            <div class="birdhouse_holes"></div>
                        </div>
                        <div class="icon-wrap icon-ribbon hide" data-idx="1">
                            <div class="ribbon"></div>
                        </div>
                        
                        <div class="icon-wrap icon-link hide" data-idx="2">
                            <div class="loopback_l"></div>
                            <div class="loopback_r"></div>
                        </div>
                        
                        
                        <div class="icon-wrap icon-me hide" data-idx="3">
                            <div class="user"></div>
                            <div class="shoulder"></div>
                        </div>
                        
                    </div>
                    
                </div>
                <div class="tips-box hide">
                    <div class="tips-arrow"></div>
                    <ul class="tips-inner">
                        <li>菜单</li>
                        <li>标签</li>
                        
                        <li>友情链接</li>
                        
                        
                        <li>关于我</li>
                        
                    </ul>
                </div>
            </div>
        

        <div id="switch-area" class="switch-area">
            <div class="switch-wrap">
                <section class="switch-part switch-part1">
                    <nav class="header-menu">
                        <ul>
                        
                            <li><a href="/">主页</a></li>
                        
                            <li><a href="/archives/">所有文章</a></li>
                        
                            <li><a href="/tags/">标签云</a></li>
                        
                            <li><a href="/about/">关于我</a></li>
                        
                        </ul>
                    </nav>
                    <nav class="header-nav">
                        <ul class="social">
                            
                                <a class="fa Email" href="mailto:653538096@qq.com" title="Email"></a>
                            
                                <a class="fa GitHub" target="_blank" rel="noopener" href="https://github.com/BrightSoulXYHY" title="GitHub"></a>
                            
                                <a class="fa 知乎" target="_blank" rel="noopener" href="https://www.zhihu.com/column/c_1195290248320770048" title="知乎"></a>
                            
                        </ul>
                    </nav>
                </section>
                
                
                <section class="switch-part switch-part2">
                    <div class="widget tagcloud" id="js-tagcloud">
                        <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/tags/AirSim/" rel="tag">AirSim</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/C/" rel="tag">C++</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Python/" rel="tag">Python</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/SITL/" rel="tag">SITL</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Sublime/" rel="tag">Sublime</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/VIO/" rel="tag">VIO</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%BC%80%E5%8F%91%E6%96%87%E6%A1%A3/" rel="tag">开发文档</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%95%B0%E5%AD%A6/" rel="tag">数学</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%96%87%E6%A1%A3/" rel="tag">文档</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E8%87%AA%E5%8A%A8%E6%8E%A7%E5%88%B6%E5%8E%9F%E7%90%86/" rel="tag">自动控制原理</a></li></ul>
                    </div>
                </section>
                
                
                
                <section class="switch-part switch-part3">
                    <div id="js-friends">
                    
                      <a class="main-nav-link switch-friends-link" target="_blank" rel="noopener" href="https://hexo.io">Hexo</a>
                    
                      <a class="main-nav-link switch-friends-link" target="_blank" rel="noopener" href="https://pages.github.com/">GitHub</a>
                    
                      <a class="main-nav-link switch-friends-link" target="_blank" rel="noopener" href="http://moxfive.xyz/">MOxFIVE</a>
                    
                    </div>
                </section>
                

                
                
                <section class="switch-part switch-part4">
                
                    <div id="js-aboutme">努力成为独当一面的自动驾驶工程师。</div>
                </section>
                
            </div>
        </div>
    </header>                
</div>
    </div>
    <div class="mid-col">
      <nav id="mobile-nav">
      <div class="overlay">
          <div class="slider-trigger"></div>
          <h1 class="header-author js-mobile-header hide"><a href="/" title="回到主页">BrightSoul</a></h1>
      </div>
    <div class="intrude-less">
        <header id="header" class="inner">
            <a href="/" class="profilepic">
                <img src="/img/BrightSoul.jpg" class="animated zoomIn">
            </a>
            <hgroup>
              <h1 class="header-author"><a href="/" title="回到主页">BrightSoul</a></h1>
            </hgroup>
            
            <p class="header-subtitle">顺不妄喜，逆不惶馁。</p>
            
            <nav class="header-menu">
                <ul>
                
                    <li><a href="/">主页</a></li>
                
                    <li><a href="/archives/">所有文章</a></li>
                
                    <li><a href="/tags/">标签云</a></li>
                
                    <li><a href="/about/">关于我</a></li>
                
                <div class="clearfix"></div>
                </ul>
            </nav>
            <nav class="header-nav">
                        <ul class="social">
                            
                                <a class="fa Email" target="_blank" href="mailto:653538096@qq.com" title="Email"></a>
                            
                                <a class="fa GitHub" target="_blank" href="https://github.com/BrightSoulXYHY" title="GitHub"></a>
                            
                                <a class="fa 知乎" target="_blank" href="https://www.zhihu.com/column/c_1195290248320770048" title="知乎"></a>
                            
                        </ul>
            </nav>
        </header>                
    </div>
    <link class="menu-list" tags="标签" friends="友情链接" about="关于我"/>
</nav>
      <div class="body-wrap"><article id="post-2020-06Airsim仿真" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/articles/2020-06Airsim%E4%BB%BF%E7%9C%9F/" class="article-date">
      <time datetime="2020-06-01T16:00:00.000Z" itemprop="datePublished">2020-06-02</time>
</a>


    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      Airsim仿真
    </h1>
  

      </header>
      
      <div class="article-info article-info-post">
        
    <div class="article-category tagcloud">
    <a class="article-category-link" href="/categories/%E6%97%A0%E4%BA%BA%E6%9C%BA/">无人机</a>
    </div>


        
    <div class="article-tag tagcloud">
        <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/AirSim/" rel="tag">AirSim</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/SITL/" rel="tag">SITL</a></li></ul>
    </div>

        <div class="clearfix"></div>
      </div>
      
    
    <div class="article-entry" itemprop="articleBody">
      
          
        <p>AirSim是微软在2017年发布的无人机无人车仿真框架，基于虚幻引擎开发。最初的开发目的用于生成机器学习的数据，不过随着这几年功能不断完善，作为机器视觉实验平台和任务仿真的工具也是一个不错的选择。特别是和Pixhawk通过MAVlink链接后可以进行SITL和HITL，可以简单的从仿真环境移植到真实的无人机。</p>
<p>本文将分享一些AirSim的使用体验，然后简单介绍AirSim仿真环境的搭建，最后介绍AirSim仿真和PX4的SITL的连接。</p>
<a id="more"></a>

<h2 id="AirSim体验"><a href="#AirSim体验" class="headerlink" title="AirSim体验"></a>AirSim体验</h2><p>关于AirSim的使用，有三种方式。推荐在Win平台上跑AirSim，局域网里另外一台电脑跑SITL。</p>
<ol>
<li><p>下载github编译好的release，不过场景比较有限</p>
</li>
<li><p>在win中编译环境，编译出的binary可以直接的复制到其他的win pc中运行，支持Airsim的SimpleFlitht和PX4.的SITL+HITL。大概不能交叉编译，尝试了没成功，也可能是方法不对。</p>
</li>
<li><p>在Linux中编译环境，不过不太推荐这么干，UE引擎得编译安装而且编译出来的binary不支持PX4.的相关仿真。不过在之前斯东大佬沟通开了新分支修复了相关的bug，没整合到官方master中。(时间关系，没尝试过用该分支编译环境)</p>
</li>
</ol>
<p><img src="https://hexo-blog-bs.oss-cn-beijing.aliyuncs.com/_blog-img/2020-06Airsim%E4%BB%BF%E7%9C%9F/image-20200515230754300.png"></p>
<p>2020年4月AirSim进行了一波大更新，2月的时候用的master分支还是VS2017+UE4.18，前几天更新的时候就迁移到了VS2019+UE4.24。主要的改动如下</p>
<ol>
<li><p>VS版本更新，开发环境变化，不过同时安装VS2017和VS2019似乎会导致程序打包的时候出错。</p>
</li>
<li><p>UE版本变动，新版本的UE使用了Vulkan驱动，让仿真场景更加丝爽润滑，但也更吃硬件。下面的表格对比了不同环境的图像和IMU频率（v1.3.1的Realse），测试环境（i5-7300+1050TI笔记本）对比实际D435i相机和Euroc数据集的频率仿真的频率还是偏低（也可能是电脑太辣鸡）。</p>
<p><img src="https://hexo-blog-bs.oss-cn-beijing.aliyuncs.com/_blog-img/2020-06Airsim%E4%BB%BF%E7%9C%9F/image-20200602155121660.png"></p>
<p>而对于编译的环境，Airsim版本更新的提升还是有一些的，但感觉没预想中那么大。</p>
<p><img src="https://hexo-blog-bs.oss-cn-beijing.aliyuncs.com/_blog-img/2020-06Airsim%E4%BB%BF%E7%9C%9F/image-20200602155400378.png"></p>
</li>
<li><p>PX4的固件从v1.8.2更新到v1.10.1，主要影响的是仿真接口，仿真器的链接从UDP转为了TCP，其他的UDP端口略有变化。<img src="https://hexo-blog-bs.oss-cn-beijing.aliyuncs.com/_blog-img/2020-06Airsim%E4%BB%BF%E7%9C%9F/image-20200602154320711.png"></p>
<p>更新之后不再支持v1.8.2固件的SITL，这个影响对使用WSL的开发者影响比较大，v1.8之后的SITL因为WSL的bug会因为没有权限创建一个链接，导致仿真没法进行，尝试在脚本里用root权限运行不过不太好使的亚子。可以考虑WSL2/虚拟机/分布式开发。</p>
<p><img src="https://hexo-blog-bs.oss-cn-beijing.aliyuncs.com/_blog-img/2020-06Airsim%E4%BB%BF%E7%9C%9F/image-20200515232924152.png"></p>
</li>
</ol>
<h2 id="AirSim环境搭建"><a href="#AirSim环境搭建" class="headerlink" title="AirSim环境搭建"></a>AirSim环境搭建</h2><p>关于AirSim的环境搭建网上已经有不少详细的教程，我就不具体写了。最主要的困难大概就是需要一把稳固的梯子。AirSim插件编译好后可以下载各种UE的素材建立自己的任务环境。</p>
<p>官方文档：<a target="_blank" rel="noopener" href="https://microsoft.github.io/AirSim/build_windows/">https://microsoft.github.io/AirSim/build_windows/</a></p>
<p>知乎@aaron20127的教程：<a target="_blank" rel="noopener" href="https://zhuanlan.zhihu.com/p/43245459">https://zhuanlan.zhihu.com/p/43245459</a></p>
<h2 id="AirSim-SITL"><a href="#AirSim-SITL" class="headerlink" title="AirSim+SITL"></a>AirSim+SITL</h2><p>AirSim的贴图和纹理对比Gazebo更接近真实场景，跑图像识别和SLAM之类的也比较有优势。AirSim有自带的SampleFlight模式，可以比较方便的验证视觉控制的算法。不过要与实际情况更接近的话还是带上PX4的SITL会好一些。下面列举几个AirSim+SITL的配置，下面的例子是在v1.8.2环境下，v1.10.1修改对应的端口即可。</p>
<ol>
<li>WSL运行SITL+主机运行AirSim</li>
</ol>
<p>个人更推荐这种方式，Win平台下可以方便的使用UE搭建任务场景，编译出二进制程序后不管是本机运行还是拷贝到其他的电脑上运行都很方便。而编译飞控相关的可以使用WSL，WSL和主机共享IP，通过<code>127.0.0.1</code>可以相互访问。（WSL2就是IP独立，相当于一个Hyper-V虚拟机）</p>
<p>首先修改AirSim的配置文件，<code>&quot;UseSerial&quot;: false,</code>表明使用SITL而不是HITL，设定相关的端口同上图，若设置集群对应修改飞机和端口号</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">    &quot;SeeDocsAt&quot;: &quot;https:&#x2F;&#x2F;github.com&#x2F;Microsoft&#x2F;AirSim&#x2F;blob&#x2F;master&#x2F;docs&#x2F;settings.md&quot;,</span><br><span class="line">    &quot;SettingsVersion&quot;: 1.2,</span><br><span class="line">    &quot;SimMode&quot;: &quot;Multirotor&quot;,</span><br><span class="line">    &quot;Vehicles&quot;:&#123;</span><br><span class="line">        &quot;mav_00&quot;: &#123;</span><br><span class="line">            &quot;VehicleType&quot;: &quot;PX4Multirotor&quot;,</span><br><span class="line">            &quot;X&quot;: 0, &quot;Y&quot;: 0, &quot;Z&quot;: -1,</span><br><span class="line">            &quot;UseSerial&quot;: false,</span><br><span class="line">            &quot;SitlIp&quot;: &quot;127.0.0.1&quot;,</span><br><span class="line">            &quot;SitlPort&quot;: 14556,</span><br><span class="line">            &quot;UdpIp&quot;: &quot;127.0.0.1&quot;,</span><br><span class="line">            &quot;UdpPort&quot;: 14560,</span><br><span class="line">            &quot;QgcHostIp&quot;: &quot;127.0.0.1&quot;,</span><br><span class="line">            &quot;QgcPort&quot;: 14550</span><br><span class="line">        &#125;</span><br><span class="line">    </span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>然后在WSL里面运行SITL，使用对应版本的编译指令，例如1.8.2的<code>make posix none_iris</code></p>
<p>先打开QGC地面站，最后打开编译好的环境。AirSim会给QGC发一个HB然后QGC发送一些初始化信息给SITL完成初始化，当初在这里卡了半天。</p>
<p><img src="https://hexo-blog-bs.oss-cn-beijing.aliyuncs.com/_blog-img/2020-06Airsim%E4%BB%BF%E7%9C%9F/image-20200602163313679.png"></p>
<p>这块有一点疑问就是，AirSim的机头朝向正北的时候SITL的数据会有偏差，比如上图所示的yaw为9°。</p>
<ol start="2">
<li>Linux运行SITL+AirSim</li>
</ol>
<p>个人感觉挺蛋疼的，在Linux上开发UE。各种FBX格式的模型在Win上建模和制作更顺手来着，而且Linux的虚幻得从源码编译安装，挺费事的。。。反正直观体验不是太好，Ubuntu18.04环境，下载UE源码一个晚上，编译一个晚上，最后在Ubuntu上搭建环境啥的流畅度还不如在Win上。个人极力不推荐。</p>
<ol start="3">
<li>分布式架构</li>
</ol>
<p>终于到重头戏了，分布式是我觉得最舒服的开发和仿真方式。笔记本是常用机，双系统，Win开发好了UE的任务环境打包出二进制文件，拷贝到台式机运行。然后笔记本切到Ubuntu，跑ROS和SITL相关的玩意。</p>
<p><img src="https://hexo-blog-bs.oss-cn-beijing.aliyuncs.com/_blog-img/2020-06Airsim%E4%BB%BF%E7%9C%9F/image-20200602161432813.png"></p>
<p>分布式的注意事项和之前的差不多，记得先开GCS，不过配置文件需要修改IP地址，其中<code>LocalHostIp</code>为运行AirSim环境的台式机的IP，<code>UdpIp</code>和<code>SitlIp</code>是跑SITL和ROS的笔记本的IP。其他的端口我修改过，若有自定义，对应修改即可。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">    &quot;SeeDocsAt&quot;: &quot;https:&#x2F;&#x2F;github.com&#x2F;Microsoft&#x2F;AirSim&#x2F;blob&#x2F;master&#x2F;docs&#x2F;settings.md&quot;,</span><br><span class="line">    &quot;SettingsVersion&quot;: 1.2,</span><br><span class="line">    &quot;SimMode&quot;: &quot;Multirotor&quot;,</span><br><span class="line">    &quot;Vehicles&quot;:&#123;</span><br><span class="line">        &quot;mav_00&quot;: &#123;</span><br><span class="line">            &quot;VehicleType&quot;: &quot;PX4Multirotor&quot;,</span><br><span class="line">            &quot;X&quot;: 0, &quot;Y&quot;: 0, &quot;Z&quot;: -1,</span><br><span class="line">            &quot;UseSerial&quot;: false,</span><br><span class="line">            &quot;LocalHostIp&quot;: &quot;192.168.3.2&quot;,</span><br><span class="line">            &quot;UdpIp&quot;: &quot;192.168.3.1&quot;,</span><br><span class="line">            &quot;UdpPort&quot;: 16200,</span><br><span class="line">            &quot;SitlIp&quot;: &quot;192.168.3.1&quot;,</span><br><span class="line">            &quot;SitlPort&quot;: 16100,</span><br><span class="line">            &quot;QgcHostIp&quot;: &quot;192.168.3.1&quot;,</span><br><span class="line">            &quot;QgcPort&quot;: 14550</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">    </span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>



      
    </div>
    
  </div>
  
    
    <div class="copyright">
        <p><span>本文标题:</span><a href="/articles/2020-06Airsim%E4%BB%BF%E7%9C%9F/">Airsim仿真</a></p>
        <p><span>文章作者:</span><a href="/" title="回到主页">BrightSoul</a></p>
        <p><span>发布时间:</span>2020-06-02, 00:00:00</p>
        <!-- <p><span>最后更新:</span>2021-02-03, 17:53:30</p> -->
        <p>
            <span>原始链接:</span><a class="post-url" href="/articles/2020-06Airsim%E4%BB%BF%E7%9C%9F/" title="Airsim仿真">https://brightsoulxyhy.github.io/articles/2020-06Airsim%E4%BB%BF%E7%9C%9F/</a>
            <span class="copy-path" data-clipboard-text="原文: https://brightsoulxyhy.github.io/articles/2020-06Airsim%E4%BB%BF%E7%9C%9F/　　作者: BrightSoul" title="点击复制文章链接"><i class="fa fa-clipboard"></i></span>
            <script> var clipboard = new Clipboard('.copy-path'); </script>
        </p>
        <p>
            <span>许可协议:</span><i class="fa fa-creative-commons"></i> <a rel="license noopener" target="_blank" href="http://creativecommons.org/licenses/by-nc-sa/4.0/" title="CC BY-NC-SA 4.0 International" target = "_blank">"署名-非商用-相同方式共享 4.0"</a> 转载请保留原文链接及作者。
        </p>
    </div>



    <nav id="article-nav">
        
            <div id="article-nav-newer" class="article-nav-title">
                <a href="/articles/2020-06VIO/">
                    如何在AirSim中优雅的运行SLAM/VIO
                </a>
            </div>
        
        
            <div id="article-nav-older" class="article-nav-title">
                <a href="/articles/2020-04%E6%96%87%E6%A1%A3%E7%9B%B8%E5%85%B3/">
                    开发文档加载不再卡顿，亿点点提升
                </a>
            </div>
        
    </nav>

  
</article>

    <div id="toc" class="toc-article">
        <strong class="toc-title">文章目录</strong>
        
            <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#AirSim%E4%BD%93%E9%AA%8C"><span class="toc-number">1.</span> <span class="toc-text">AirSim体验</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#AirSim%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA"><span class="toc-number">2.</span> <span class="toc-text">AirSim环境搭建</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#AirSim-SITL"><span class="toc-number">3.</span> <span class="toc-text">AirSim+SITL</span></a></li></ol>
        
    </div>
    <style>
        .left-col .switch-btn,
        .left-col .switch-area {
            display: none;
        }
        .toc-level-3 i,
        .toc-level-3 ol {
            display: none !important;
        }
    </style>

    <input type="button" id="tocButton" value="隐藏目录"  title="点击按钮隐藏或者显示文章目录">

    <script>
        yiliaConfig.toc = ["隐藏目录", "显示目录", !!"false"];
    </script>



    
<div class="share">
    
        <div class="bdsharebuttonbox">
            <a href="#" class="fa fa-twitter bds_twi" data-cmd="twi" title="分享到推特"></a>
            <a href="#" class="fa fa-weibo bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
            <a href="#" class="fa fa-qq bds_sqq" data-cmd="sqq" title="分享给 QQ 好友"></a>
            <a href="#" class="fa fa-files-o bds_copy" data-cmd="copy" title="复制网址"></a>
            <a href="#" class="fa fa fa-envelope-o bds_mail" data-cmd="mail" title="通过邮件分享"></a>
            <a href="#" class="fa fa-weixin bds_weixin" data-cmd="weixin" title="生成文章二维码"></a>
            <a href="#" class="fa fa-share-alt bds_more" data-cmd="more"></i></a>
        </div>
        <script>
            window._bd_share_config={
                "common":{"bdSnsKey":{},"bdText":"Airsim仿真　| 我不想写博客之博客　","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
        </script>
    

    
</div>







    




    <div class="scroll" id="post-nav-button">
        
            <a href="/articles/2020-06VIO/" title="上一篇: 如何在AirSim中优雅的运行SLAM/VIO">
                <i class="fa fa-angle-left"></i>
            </a>
        

        <a title="文章列表"><i class="fa fa-bars"></i><i class="fa fa-times"></i></a>

        
            <a href="/articles/2020-04%E6%96%87%E6%A1%A3%E7%9B%B8%E5%85%B3/" title="下一篇: 开发文档加载不再卡顿，亿点点提升">
                <i class="fa fa-angle-right"></i>
            </a>
        
    </div>

    <ul class="post-list"><li class="post-list-item"><a class="post-list-link" href="/articles/2021-01%E4%BD%BF%E7%94%A8Sphinx%E5%B0%86%E4%B8%AA%E4%BA%BA%E7%AC%94%E8%AE%B0%E5%8F%98%E6%88%90%E6%96%87%E6%A1%A3%E7%9A%84%E5%BD%A2%E7%8A%B6/">使用Sphinx将个人笔记变成文档的形状~</a></li><li class="post-list-item"><a class="post-list-link" href="/articles/2020-06%E5%AE%9E%E9%AA%8C%E5%AE%A4%E5%85%AC%E4%BC%97%E5%8F%B7/">VIO——让无人机更自主更智能</a></li><li class="post-list-item"><a class="post-list-link" href="/articles/2020-06VIO/">如何在AirSim中优雅的运行SLAM/VIO</a></li><li class="post-list-item"><a class="post-list-link" href="/articles/2020-06Airsim%E4%BB%BF%E7%9C%9F/">Airsim仿真</a></li><li class="post-list-item"><a class="post-list-link" href="/articles/2020-04%E6%96%87%E6%A1%A3%E7%9B%B8%E5%85%B3/">开发文档加载不再卡顿，亿点点提升</a></li><li class="post-list-item"><a class="post-list-link" href="/articles/2020-02APM%E6%96%AD%E7%82%B9%E5%92%8C%E5%8D%95%E6%AD%A5%E8%B0%83%E8%AF%95%EF%BC%88WIN%EF%BC%89/">APM断点和单步调试（WIN）</a></li><li class="post-list-item"><a class="post-list-link" href="/articles/2019-12Arducopter/">PX4飞控入门</a></li><li class="post-list-item"><a class="post-list-link" href="/articles/2018-11%E8%87%AA%E5%AE%9A%E4%B9%89Sublime%E7%BC%96%E8%AF%91%E7%B3%BB%E7%BB%9F/">自定义Sublime编译系统</a></li><li class="post-list-item"><a class="post-list-link" href="/articles/2018-10laplace/">Laplace变换</a></li></ul>




    <script>
        
    </script>
</div>
      <footer id="footer">
    <div class="outer">
        <div id="footer-info">
            <div class="footer-left">
                <i class="fa fa-copyright"></i> 
                2018-2021 BrightSoul
            </div>
            <div class="footer-right">
                <a href="http://hexo.io/" target="_blank" title="快速、简洁且高效的博客框架">Hexo</a>  Theme <a href="https://github.com/MOxFIVE/hexo-theme-yelee" target="_blank" title="简而不减 Hexo 双栏博客主题  v3.5">Yelee</a> by MOxFIVE <i class="fa fa-heart animated infinite pulse"></i>
            </div>
        </div>
        
            <div class="visit">
                
                    <span id="busuanzi_container_site_pv" style='display:none'>
                        <span id="site-visit" title="本站到访数"><i class="fa fa-user" aria-hidden="true"></i><span id="busuanzi_value_site_uv"></span>
                        </span>
                    </span>
                
                
                    <span>| </span>
                
                
                    <span id="busuanzi_container_page_pv" style='display:none'>
                        <span id="page-visit"  title="本页阅读量"><i class="fa fa-eye animated infinite pulse" aria-hidden="true"></i><span id="busuanzi_value_page_pv"></span>
                        </span>
                    </span>
                
            </div>
        
    </div>
</footer>
    </div>
    
<script data-main="/js/main.js" src="//cdn.bootcss.com/require.js/2.2.0/require.min.js"></script>

    <script>
        $(document).ready(function() {
            var iPad = window.navigator.userAgent.indexOf('iPad');
            if (iPad > -1 || $(".left-col").css("display") === "none") {
                var bgColorList = ["#9db3f4", "#414141", "#e5a859", "#f5dfc6", "#c084a0", "#847e72", "#cd8390", "#996731"];
                var bgColor = Math.ceil(Math.random() * (bgColorList.length - 1));
                $("body").css({"background-color": bgColorList[bgColor], "background-size": "cover"});
            }
            else {
                var backgroundnum = 5;
                var backgroundimg = "url(/background/bg-x.jpg)".replace(/x/gi, Math.ceil(Math.random() * backgroundnum));
                $("body").css({"background": backgroundimg, "background-attachment": "fixed", "background-size": "cover"});
            }
        })
    </script>





    <script type="text/x-mathjax-config">
MathJax.Hub.Config({
    tex2jax: {
        inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
        processEscapes: true,
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
    }
});

MathJax.Hub.Queue(function() {
    var all = MathJax.Hub.getAllJax(), i;
    for(i=0; i < all.length; i += 1) {
        all[i].SourceElement().parentNode.className += ' has-jax';                 
    }       
});
</script>

<script src="//cdn.bootcss.com/mathjax/2.6.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>


<div class="scroll" id="scroll">
    <a href="#" title="返回顶部"><i class="fa fa-arrow-up"></i></a>
    <a href="#comments" onclick="load$hide();" title="查看评论"><i class="fa fa-comments-o"></i></a>
    <a href="#footer" title="转到底部"><i class="fa fa-arrow-down"></i></a>
</div>
<script>
    // Open in New Window
    
        var oOpenInNew = {
            
             title: "a.article-title, .article-more-link a", 
            
            
            
            
             archives: ".archive-article-title", 
             miniArchives: "a.post-list-link", 
            
             friends: "#js-friends a", 
             socail: ".social a" 
        }
        for (var x in oOpenInNew) {
            $(oOpenInNew[x]).attr("target", "_blank");
        }
    
</script>

<script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
</script>
  </div>
</body>
</html>